Skip to content

Create 3 proxy endpoints for project members/invites #158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

imcaizheng
Copy link
Contributor

Verification Screenshots

  • GET /taas-teams/:id/members

    GET /taas-teams/:id/members

  • GET /taas-teams/:id/invites

    GET /taas-teams/:id/invites

  • DELETE /taas-teams/:id/members/:projectMemberId

    DELETE /taas-teams/:id/members/:projectMemberId

@@ -76,7 +76,7 @@ app.use((err, req, res, next) => {

if (err.response) {
// extract error message from V3/V5 API
errorResponse.message = _.get(err, 'response.body.result.content') || _.get(err, 'response.body.message')
errorResponse.message = _.get(err, 'response.body.result.content.message') || _.get(err, 'response.body.message')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract v3 error message from the correct position in the response body.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it looks good.

Copy link
Contributor

@maxceem maxceem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, @imcaizheng the code looks and works perfectly.

@@ -76,7 +76,7 @@ app.use((err, req, res, next) => {

if (err.response) {
// extract error message from V3/V5 API
errorResponse.message = _.get(err, 'response.body.result.content') || _.get(err, 'response.body.message')
errorResponse.message = _.get(err, 'response.body.result.content.message') || _.get(err, 'response.body.message')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, it looks good.

@maxceem maxceem merged commit 46c69e6 into topcoder-platform:dev Feb 24, 2021
@maxceem maxceem mentioned this pull request Feb 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants